package com.gyg.returns;

/**
 * @author gyg
 * @version V1.0.0
 * @description:
 * @date 2020/12/29 21:08
 */
public enum RespCode {
    /**
     * 错误码枚举
     */
    USER_NOT_FOUND(101,"没有登录或会话超时"),
    SUCCESS(200,"success"),
    PARAMETERS_ERROR(400,"参数非法或格式有误"),
    ACCESS_DENIED(403,"没有权限"),
    NOT_FOUND(404,"数据不存在"),
    SERVER_ERROR(500,"系统异常"),
    SERVICE_TIMEOUT(504,"服务器超时"),
    WE_CHART_ERROR(500, "微信官方接口调用失败"),
    IS_SIGN(1016, "已签到"),
    CODE_ERROR(500, "验证码输入不一致！"),
    LOGIN_ERROR(500, "账号或密码错误！"),
    UPLOAD_ERROR(500, "文件上传失败"),
    IS_BAN(110, "您已被封禁，请远离不合法行为！"),
    NOT_ADMIN(111, "请使用管理员账号登陆！");

    private final Integer code;
    private String message;

    private RespCode(Integer code, String message)
    {
        this.code = code;
        this.message = message;
    }

    public Integer getCode()
    {
        return code;
    }

    public String getMessage()
    {
        return message;
    }

    public void setMessage(String message){
        this.message = message;
    }
}
